
class MyCollectionListModel {
  List<MyCollectionListItem>? list;
  int? pageNum;
  int? pageSize;
  int? total;
  int? totalPage;

  MyCollectionListModel({this.list, this.pageNum, this.pageSize, this.total, this.totalPage});

  MyCollectionListModel.fromJson(Map<String, dynamic> json) {
    list = json["list"] == null ? null : (json["list"] as List).map((e) => MyCollectionListItem.fromJson(e)).toList();
    pageNum = json["pageNum"];
    pageSize = json["pageSize"];
    total = json["total"];
    totalPage = json["totalPage"];
  }

  static List<MyCollectionListModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(MyCollectionListModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if(list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    _data["pageNum"] = pageNum;
    _data["pageSize"] = pageSize;
    _data["total"] = total;
    _data["totalPage"] = totalPage;
    return _data;
  }

  MyCollectionListModel copyWith({
    List<MyCollectionListItem>? list,
    int? pageNum,
    int? pageSize,
    int? total,
    int? totalPage,
  }) => MyCollectionListModel(
    list: list ?? this.list,
    pageNum: pageNum ?? this.pageNum,
    pageSize: pageSize ?? this.pageSize,
    total: total ?? this.total,
    totalPage: totalPage ?? this.totalPage,
  );
}

class MyCollectionListItem {
  int? activityId;
  String? buyPrice;
  String? chainStatus;
  String? collectionEquity;
  int? collectionId;
  String? collectionName;
  String? contractAddress;
  String? coverImageUrl;
  String? createdTime;
  String? daoHeadImageUrl;
  int? daoId;
  String? daoName;
  String? id;
  int? incubationDays;
  bool? isHold;
  bool? isLockedHouse;
  bool? isOnSale;
  String? lockedPositionTime;
  int? productCount;
  String? receiveMethod;
  String? seriesName;
  String? tokenId;
  int? totalIssueCount;
  String? transferStatus;
  bool? transferable;
  int? userId;

  MyCollectionListItem({this.activityId, this.buyPrice, this.chainStatus, this.collectionEquity, this.collectionId, this.collectionName, this.contractAddress, this.coverImageUrl, this.createdTime, this.daoHeadImageUrl, this.daoId, this.daoName, this.id, this.incubationDays, this.isHold, this.isLockedHouse, this.isOnSale, this.lockedPositionTime, this.productCount, this.receiveMethod, this.seriesName, this.tokenId, this.totalIssueCount, this.transferStatus, this.transferable, this.userId});

  MyCollectionListItem.fromJson(Map<String, dynamic> json) {
    activityId = json["activityId"];
    buyPrice = json["buyPrice"];
    chainStatus = json["chainStatus"];
    collectionEquity = json["collectionEquity"];
    collectionId = json["collectionId"];
    collectionName = json["collectionName"];
    contractAddress = json["contractAddress"];
    coverImageUrl = json["coverImageUrl"];
    createdTime = json["createdTime"];
    daoHeadImageUrl = json["daoHeadImageUrl"];
    daoId = json["daoId"];
    daoName = json["daoName"];
    id = json["id"];
    incubationDays = json["incubationDays"];
    isHold = json["isHold"];
    isLockedHouse = json["isLockedHouse"];
    isOnSale = json["isOnSale"];
    lockedPositionTime = json["lockedPositionTime"];
    productCount = json["productCount"];
    receiveMethod = json["receiveMethod"];
    seriesName = json["seriesName"];
    tokenId = json["tokenId"];
    totalIssueCount = json["totalIssueCount"];
    transferStatus = json["transferStatus"];
    transferable = json["transferable"];
    userId = json["userId"];
  }

  static List<MyCollectionListItem> fromList(List<Map<String, dynamic>> list) {
    return list.map(MyCollectionListItem.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["activityId"] = activityId;
    _data["buyPrice"] = buyPrice;
    _data["chainStatus"] = chainStatus;
    _data["collectionEquity"] = collectionEquity;
    _data["collectionId"] = collectionId;
    _data["collectionName"] = collectionName;
    _data["contractAddress"] = contractAddress;
    _data["coverImageUrl"] = coverImageUrl;
    _data["createdTime"] = createdTime;
    _data["daoHeadImageUrl"] = daoHeadImageUrl;
    _data["daoId"] = daoId;
    _data["daoName"] = daoName;
    _data["id"] = id;
    _data["incubationDays"] = incubationDays;
    _data["isHold"] = isHold;
    _data["isLockedHouse"] = isLockedHouse;
    _data["isOnSale"] = isOnSale;
    _data["lockedPositionTime"] = lockedPositionTime;
    _data["productCount"] = productCount;
    _data["receiveMethod"] = receiveMethod;
    _data["seriesName"] = seriesName;
    _data["tokenId"] = tokenId;
    _data["totalIssueCount"] = totalIssueCount;
    _data["transferStatus"] = transferStatus;
    _data["transferable"] = transferable;
    _data["userId"] = userId;
    return _data;
  }

  MyCollectionListItem copyWith({
    int? activityId,
    String? buyPrice,
    String? chainStatus,
    String? collectionEquity,
    int? collectionId,
    String? collectionName,
    String? contractAddress,
    String? coverImageUrl,
    String? createdTime,
    String? daoHeadImageUrl,
    int? daoId,
    String? daoName,
    String? id,
    int? incubationDays,
    bool? isHold,
    bool? isLockedHouse,
    bool? isOnSale,
    String? lockedPositionTime,
    int? productCount,
    String? receiveMethod,
    String? seriesName,
    String? tokenId,
    int? totalIssueCount,
    String? transferStatus,
    bool? transferable,
    int? userId,
  }) => MyCollectionListItem(
    activityId: activityId ?? this.activityId,
    buyPrice: buyPrice ?? this.buyPrice,
    chainStatus: chainStatus ?? this.chainStatus,
    collectionEquity: collectionEquity ?? this.collectionEquity,
    collectionId: collectionId ?? this.collectionId,
    collectionName: collectionName ?? this.collectionName,
    contractAddress: contractAddress ?? this.contractAddress,
    coverImageUrl: coverImageUrl ?? this.coverImageUrl,
    createdTime: createdTime ?? this.createdTime,
    daoHeadImageUrl: daoHeadImageUrl ?? this.daoHeadImageUrl,
    daoId: daoId ?? this.daoId,
    daoName: daoName ?? this.daoName,
    id: id ?? this.id,
    incubationDays: incubationDays ?? this.incubationDays,
    isHold: isHold ?? this.isHold,
    isLockedHouse: isLockedHouse ?? this.isLockedHouse,
    isOnSale: isOnSale ?? this.isOnSale,
    lockedPositionTime: lockedPositionTime ?? this.lockedPositionTime,
    productCount: productCount ?? this.productCount,
    receiveMethod: receiveMethod ?? this.receiveMethod,
    seriesName: seriesName ?? this.seriesName,
    tokenId: tokenId ?? this.tokenId,
    totalIssueCount: totalIssueCount ?? this.totalIssueCount,
    transferStatus: transferStatus ?? this.transferStatus,
    transferable: transferable ?? this.transferable,
    userId: userId ?? this.userId,
  );
}